package net.samystudio.beaver.ui.main

import android.os.Bundle
import androidx.appcompat.widget.Toolbar
import kotlinx.android.synthetic.main.activity_main.*
import net.samystudio.beaver.R
import net.samystudio.beaver.ui.base.activity.BaseToolbarActivity

class MainActivity : BaseToolbarActivity<MainActivityViewModel>() {
    override val layoutViewRes = R.layout.activity_main
    override val navControllerId: Int = R.id.nav_host
    override val viewModel by viewModels<MainActivityViewModel>()

    override fun onCreate(savedInstanceState: Bundle?) {
        // We set launch screen theme from manifest, we need to get back to our Theme to remove
        // launch screen.
        setTheme(R.style.AppTheme)

        super.onCreate(savedInstanceState)
    }

    override fun getToolbar(): Toolbar = header

    override fun onSupportNavigateUp(): Boolean = navController.navigateUp()
}
